package com.yyl.fmall.index.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yyl.fmall.index.entity.IndexImg;
import com.yyl.fmall.index.mapper.IndexImgMapper;
import com.yyl.fmall.index.service.IIndexImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 轮播图  服务实现类
 * </p>
 *
 * @author YuanSir
 * @since 2022-11-04
 */
@Service
public class IndexImgServiceImpl extends ServiceImpl<IndexImgMapper, IndexImg> implements IIndexImgService {
    
    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<IndexImg> getIndexImg() {
    
        return list(new LambdaQueryWrapper<IndexImg>().eq(IndexImg::getStatus, 1));
        
    }
}
